#ifndef _E_PH_ACTOR_H_
#define _E_PH_ACTOR_H_

#include "ePhCollisionsGroups.h"
#include "EPhShape.h"
#include "EDesc.h"
#include "EEventShape.h"

#include "eH.h"
namespace engine
{

class EPlaneShape;
class EBoxShape;
class ECapsuleShape;
class ESphereShape;
class EPhMaterial;
class EVector;

//------------------------------------------------------------
class EPhActorDesc : public EDesc
{
  NxActorDesc                 m_NxActorDesc;
  vector<NxShapeDesc*>        m_vecNxShapes;
  vector<NxTriangleMesh*>     m_vecNxTriangleMeshes;
  bool                addPlaneShape         ( const EPhShapeDesc& desc );
  bool                addBoxShape           ( const EPhShapeDesc& desc );
  bool                addCapsuleShape       ( const EPhShapeDesc& desc );
  bool                addSphereShape        ( const EPhShapeDesc& desc );
  /**
  \todo unify vertices that have the same coordinates 
  \todo divide the method into smallers methods (too long for now)
  */
  bool                addTriangleMeshShape  ( const EPhShapeDesc& desc );
public:
  EPhActorDesc( );
  virtual ~EPhActorDesc ();
  const NxActorDesc&  getNxActorDesc        () const;
  bool                addShape              ( const EPhShapeDesc& desc );
  

  bool                isValid               () const;
};

//------------------------------------------------------------
class EPhActor
{
  NxActor*      m_pNxActor;
public:
  EPhActor( NxActor* pNxActor );

  inline NxActor*   getNxActorPtr() const { return m_pNxActor; }

  void setPosition( const EVector& vPos );
};
} // end namespace

#endif